define(['uiComponent','Magento_Customer/js/customer-data','jquery','underscore','mage/mage',],function(Component,customerData,$,_){'use strict';var sidebarInitialized=false,compareProductsReloaded=false;function initSidebar(){if(sidebarInitialized){return;} sidebarInitialized=true;} return Component.extend({initialize:function(){this._super();this.compareProducts=customerData.get('compare-products');if(!compareProductsReloaded&&!_.isEmpty(this.compareProducts())&&_.indexOf(customerData.getExpiredSectionNames(),'compare-products')===-1&&window.checkout&&window.checkout.websiteId&&window.checkout.websiteId!==this.compareProducts().websiteId){this.compareProducts().count=0;customerData.reload(['compare-products'],false);compareProductsReloaded=true;} initSidebar();}});});